//  -------------------- iSharePoint -------------------- //
// 
//  Company:	IT Complex, LLC
//  Project:	Smart.Common
//  File name:	ISqlQueryExecutor.cs
//  Developer:	Solomatov Igor
//  Created:	15.04.2012
// 
//  -------------------- iSharePoint -------------------- //

using System.Collections;

namespace Smart.Common.Entities
{
	/// <summary>
	/// Sql list query executor
	/// </summary>
	public interface ISqlQueryExecutor<TEntityType> where TEntityType : Entity
	{
		/// <summary>
		/// Query
		/// </summary>
		IQueryBuilder<ISqlQueryExecutor<TEntityType>> Query { get; set; }

		/// <summary>
		/// List
		/// </summary>
		EntityList<TEntityType> List { get; set; }

		/// <summary>
		/// Execute query and return all items
		/// </summary>
		IEnumerable GetItems();

		/// <summary>
		/// Execute query and return first item
		/// </summary>
		EntityList<TEntityType> GetItem();

		/// <summary>
		/// Execute query and return top <paramref name="rowLimit"/> items
		/// </summary>
		IEnumerable GetItems(int rowLimit);
	}
}